package com.st.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.st.mapper.StCoursesMapper;
import com.st.domain.StCourses;
import com.st.service.IStCoursesService;

/**
 * 课程Service业务层处理
 *
 * @author zhw
 * @date 2024-10-24
 */
@Service
public class StCoursesServiceImpl extends ServiceImpl<StCoursesMapper, StCourses> implements IStCoursesService {
    @Autowired
    private StCoursesMapper stCoursesMapper;

    /**
     * 查询课程
     *
     * @param id 课程主键
     * @return 课程
     */
    @Override
    public StCourses selectStCoursesById(Integer id) {
        return stCoursesMapper.selectStCoursesById(id);
    }

    /**
     * 查询课程列表
     *
     * @param stCourses 课程
     * @return 课程
     */
    @Override
    public List<StCourses> selectStCoursesList(StCourses stCourses) {
        return stCoursesMapper.selectStCoursesList(stCourses);
    }

    /**
     * 新增课程
     *
     * @param stCourses 课程
     * @return 结果
     */
    @Override
    public int insertStCourses(StCourses stCourses) {
            return stCoursesMapper.insertStCourses(stCourses);
    }

    /**
     * 修改课程
     *
     * @param stCourses 课程
     * @return 结果
     */
    @Override
    public int updateStCourses(StCourses stCourses) {
        return stCoursesMapper.updateStCourses(stCourses);
    }

    /**
     * 批量删除课程
     *
     * @param ids 需要删除的课程主键
     * @return 结果
     */
    @Override
    public int deleteStCoursesByIds(Integer[] ids) {
        return stCoursesMapper.deleteStCoursesByIds(ids);
    }

    /**
     * 删除课程信息
     *
     * @param id 课程主键
     * @return 结果
     */
    @Override
    public int deleteStCoursesById(Integer id) {
        return stCoursesMapper.deleteStCoursesById(id);
    }
}